package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.dao.TenantQuestionnaireAnswerMapper;
import com.hgkj.cloud.base.domain.TenantQuestionnaireAnswer;
import com.hgkj.cloud.base.service.TenantQuestionnaireAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TenantQuestionnaireAnswerServiceImpl implements TenantQuestionnaireAnswerService {

    @Autowired
    private TenantQuestionnaireAnswerMapper tenantQuestionnaireAnswerMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return tenantQuestionnaireAnswerMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(TenantQuestionnaireAnswer record) {
        return tenantQuestionnaireAnswerMapper.insert(record);
    }

    @Override
    public int insertSelective(TenantQuestionnaireAnswer record) {
        return tenantQuestionnaireAnswerMapper.insertSelective(record);
    }

    @Override
    public TenantQuestionnaireAnswer selectByPrimaryKey(Long id) {
        return tenantQuestionnaireAnswerMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(TenantQuestionnaireAnswer record) {
        return tenantQuestionnaireAnswerMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TenantQuestionnaireAnswer record) {
        return tenantQuestionnaireAnswerMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<TenantQuestionnaireAnswer> listAllQnAnswers(Long question_id) {
        return tenantQuestionnaireAnswerMapper.listAllQnAnswers(question_id);
    }

    @Override
    public List<TenantQuestionnaireAnswer> getQnAnswerByQid(Long question_id) {
        return tenantQuestionnaireAnswerMapper.getQnAnswerByQid(question_id);
    }

    @Override
    public int delQnAnswer(Long question_id) {
        return tenantQuestionnaireAnswerMapper.delQnAnswer(question_id);
    }

    @Override
    public int listAllQnAnswersCount(Map<String, Object> map) {
        return tenantQuestionnaireAnswerMapper.listAllQnAnswersCount(map);
    }

    @Override
    public List<Map<String, Object>> getScoreByQnId(Long id) {
        return tenantQuestionnaireAnswerMapper.getScoreByQnId(id);
    }

    @Override
    public Map<String, Object> getQNAnswer(Map<String, Object> map) {
        return tenantQuestionnaireAnswerMapper.getQNAnswer(map);
    }
}
